import { createApp } from 'vue'
import indexApp from './App.vue'
import router from '@/router'
import store from '@/store'
import moment from 'moment'
import axios from 'axios'
import VueAxios from 'vue-axios'
import elementResizeDetectorMaker from 'element-resize-detector'
import directiveAll from '@/complete/directive'

// 根部件
const app = createApp(indexApp)
// 全局
app.config.globalProperties.$erd = elementResizeDetectorMaker()
app.config.globalProperties.$moment = moment
// 指令注册
for (const directiveAllKey in directiveAll) {
  app.directive(directiveAllKey, directiveAll[directiveAllKey])
}
// 其它
app.use(router)
app.use(store)
app.use(VueAxios, axios)
app.mount('#appRoot')
